package com.hirel.domain.common;

import java.sql.Timestamp;
import java.util.Collection;
import java.util.Date;
import java.util.HashSet;

import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

import org.springframework.security.core.GrantedAuthority;




@Entity
@Table(name = "USER_DETAILS")
public class UserDetailsDTO {

	private Integer userId;
	private String userName;
	private String password;
	private Boolean userGender;
	private Date userDob;
	private Double userContact;
	private String userEmailid;
	private Date userDoj;
	private String userImage;
	private Boolean status;
	private Timestamp createdDate;

	@Embedded
	private UserAddress userAddress;

	
	 // ------------------- Getter method ---------------------
	 
	

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "USER_ID")
	public Integer getuserId() {
		return userId;
	}

	@Column(name = "USER_NAME", length = 100, nullable = false)
	public String getuserName() {
		return userName;
	}

	@Column(name = "USER_PASSWORD", length = 100, nullable = false)
	public String getPassword() {
		return password;
	}

	@Column(name = "USER_GENDER", nullable = true)
	public Boolean getuserGender() {
		return userGender;
	}

	@Column(name = "USER_DOB", nullable = true)
	public Date getuserDob() {
		return userDob;
	}

	@Column(name = "USER_CONTACT", length = 10, nullable = false)
	public Double getuserContact() {
		return userContact;
	}

	@Column(name = "USER_EMAIL", length = 100, nullable = false)
	public String getuserEmailid() {
		return userEmailid;
	}

	@Column(name = "USER_DOJ", nullable = true)
	public Date getuserDoj() {
		return userDoj;
	}

	@Column(name = "USER_IMAGE")
	public String getuserImage() {
		return userImage;
	}

	public UserAddress getUserAddress() {
		return userAddress;
	}

	@Column(name = "USER_STATUS", nullable = true)
	public Boolean getStatus() {
		return status;
	}

	@Column(name = "USER_CREATED_TIME")
	public Timestamp getCreatedDate() {
		return createdDate;
	}

	

//	 ---------Setter method---------- 

	public void setuserId(Integer userId) {
		this.userId = userId;
	}

	public void setuserName(String userName) {
		this.userName = userName;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setuserGender(Boolean userGender) {
		this.userGender = userGender;
	}

	public void setuserDob(Date userDob) {
		this.userDob = userDob;
	}

	public void setuserContact(Double userContact) {
		this.userContact = userContact;
	}

	public void setuserEmailid(String userEmailid) {
		this.userEmailid = userEmailid;
	}

	public void setuserDoj(Date userDoj) {
		this.userDoj = userDoj;
	}

	public void setuserImage(String userImage) {
		this.userImage = userImage;
	}

	public void setUserAddress(UserAddress userAddress) {
		this.userAddress = userAddress;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

	public void setCreatedDate(Timestamp createdDate) {
		this.createdDate = createdDate;
	}

	
	@Override
	public String toString() {
		return "UserDetailsDTO [userId=" + userId
				+ ", UserName=" + userName
				+ ", User Gender=" + userGender
				+ ", User Dob=" + userDob
				+ ", User Contact=" + userContact
				+ ", User EmailID=" + userEmailid
				+ ", User Doj=" + userDoj
				+ ", status=" + status
				+  ",Created Date=" +createdDate +"]";
	}
	

}
